﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="Avatar.aspx.cs" Inherits="Avatar" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<title>头像设置</title>
    <style type="text/css">
        .style1
        {
            padding: 10px;
            font-size: medium;
        }
    </style>
    <script type="text/javascript">
        function $(id) {
            return document.getElementById(id);
        }
        var userAgent = navigator.userAgent.toLowerCase();
        var is_opera = userAgent.indexOf('opera') != -1 && opera.version();
        var is_moz = (navigator.product == 'Gecko') && userAgent.substr(userAgent.indexOf('firefox') + 8, 3);
        var is_ie = (userAgent.indexOf('msie') != -1 && !is_opera) && userAgent.substr(userAgent.indexOf('msie') + 5, 3);
        var is_mac = userAgent.indexOf('mac') != -1;
        function AC_GetArgs(args, classid, mimeType) {
            var ret = new Object();
            ret.embedAttrs = new Object();
            ret.params = new Object();
            ret.objAttrs = new Object();
            for (var i = 0; i < args.length; i = i + 2) {
                var currArg = args[i].toLowerCase();
                switch (currArg) {
                    case "classid": break;
                    case "pluginspage": ret.embedAttrs[args[i]] = 'http://www.macromedia.com/go/getflashplayer'; break;
                    case "src": ret.embedAttrs[args[i]] = args[i + 1]; ret.params["movie"] = args[i + 1]; break;
                    case "codebase": ret.objAttrs[args[i]] = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0'; break;
                    case "onafterupdate": case "onbeforeupdate": case "onblur": case "oncellchange": case "onclick": case "ondblclick": case "ondrag": case "ondragend":
                    case "ondragenter": case "ondragleave": case "ondragover": case "ondrop": case "onfinish": case "onfocus": case "onhelp": case "onmousedown":
                    case "onmouseup": case "onmouseover": case "onmousemove": case "onmouseout": case "onkeypress": case "onkeydown": case "onkeyup": case "onload":
                    case "onlosecapture": case "onpropertychange": case "onreadystatechange": case "onrowsdelete": case "onrowenter": case "onrowexit": case "onrowsinserted": case "onstart":
                    case "onscroll": case "onbeforeeditfocus": case "onactivate": case "onbeforedeactivate": case "ondeactivate": case "type":
                    case "id": ret.objAttrs[args[i]] = args[i + 1]; break;
                    case "width": case "height": case "align": case "vspace": case "hspace": case "class": case "title": case "accesskey": case "name":
                    case "tabindex": ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i + 1]; break;
                    default: ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i + 1];
                }
            }
            ret.objAttrs["classid"] = classid;
            if (mimeType) {
                ret.embedAttrs["type"] = mimeType;
            }
            return ret;
        };
        function AC_FL_RunContent() {
            var ret = AC_GetArgs(arguments, "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash");
            var str = '';
            if (is_ie && !is_opera) {
                str += '<object ';
                for (var i in ret.objAttrs) {
                    str += i + '="' + ret.objAttrs[i] + '" ';
                }
                str += '>';
                for (var i in ret.params) {
                    str += '<param name="' + i + '" value="' + ret.params[i] + '" /> ';
                }
                str += '</object>';
            } else {
                str += '<embed ';
                for (var i in ret.embedAttrs) {
                    str += i + '="' + ret.embedAttrs[i] + '" ';
                }
                str += '></embed>';
            }
            return str;
        };
    </script>
    <script type="text/javascript"  src="../js/Avatar.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td align="left" valign="top" width="170px">
                <table class="avatar" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td align="center">
                            <div >
                                <a href="Avatar.aspx">
                                   <img id="avatarImg"  src = "../images/avatar-default.jpg"  alt="我的头像" /></a>
              <script type="text/javascript"> updateavatar('<%=Localhost %>', '<%=uid %>', '<%=isAvatar %>');  </script>
              </div>
                        </td>
                    </tr>
                </table>
                <table cellpadding="3" cellspacing="0" border="0" width="100%">
                    <tr>
                        <td align="center">
                            <a href="Avatar.aspx">头像设置</a>
                        </td>
                    </tr>
                </table>
                <table cellpadding="3" cellspacing="0" border="0">
                    <tr>
                        <td align="left">
                            <div>
                                <img src="../images/heart.gif" alt="" /></div>
                        </td>
                        <td align="left">
                            当前积分:
                        </td>
                        <td align="left">
                            <div>
                                <a href="javascript:;" style="color: #EE6A3F">1210</a></div>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                            <div>
                                <img src="../images/RSS.gif"  alt="RSS订阅"/></div>
                        </td>
                        <td colspan="2" align="left">
                            <a href="javascript:;">订阅</a>
                        </td>
                    </tr>
                </table>
                <br />
                <!-- tab -->
                <div class="tab">
                    <ul>
                        <li><a href="javascript:;">
                            <img src="../images/tab/tab-dongtai-select.gif"  alt="好友动态"/></a></li>
                        <li><a href="javascript:;">
                            <img src="../images/tab/tab-xinxi.gif" onmouseover="this.src='../images/tab/tab-xinxi-hover.gif'"
                                onmouseout="this.src='images/tab/tab-xinxi.gif'" alt="我的信息" /></a></li>
                        <li><a href="javascript:;">
                            <img src="../images/tab/tab-jifen.gif" onmouseover="this.src='../images/tab/tab-jifen-hover.gif'"
                                onmouseout="this.src='images/tab/tab-jifen.gif'" alt="我的积分 " /></a> </li>
                        <li><a href="javascript:;">
                            <img src="../images/tab/tab-guanzhu.gif" onmouseover="this.src='../images/tab/tab-guanzhu-hover.gif'"
                                onmouseout="this.src='images/tab/tab-guanzhu.gif'" alt="我关注的人" /></a> </li>
                        <li><a href="javascript:;">
                            <img src="../images/tab/tab-dangan.gif" onmouseover="this.src='../images/tab/tab-dangan-hover.gif'"
                                onmouseout="this.src='images/tab/tab-dangan.gif'" alt="孩子成长档案" /></a> </li>
                        <li><a href="javascript:;">
                            <img src="../images/tab/tab-rizhi.gif" onmouseover="this.src='../images/tab/tab-rizhi-hover.gif'"
                                onmouseout="this.src='images/tab/tab-rizhi.gif'" alt="我的日志" /></a> </li>
                        <li><a href="javascript:;">
                            <img src="../images/tab/tab-gongneng.gif" onmouseover="this.src='../images/tab/tab-gongneng-hover.gif'"
                                onmouseout="this.src='../images/tab/tab-gongneng.gif'" alt="添加功能" /></a> </li>
                    </ul>
                </div>
                <!-- tab end -->
            </td>
            <td align="left" valign="top" width="763px">
                <table class="userCenter" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td align="right" valign="top">
                            <div style="padding-right: 15px; padding-top: 5px;">
                                <table cellpadding="2" cellspacing="0" border="0">
                                    <tr>
                                        <td align="right">
                                            当前系统信息:
                                        </td>
                                        <td align="left">
                                            <div>
                                                <img src="../images/mail.gif" /></div>
                                        </td>
                                        <td align="left">
                                            <a href="javascript:;" style="color: #bc2221;">103条</a>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td align="left" valign="top">
                            <div style="padding-left: 20px; padding-bottom: 3px;">
                                <span>小明家长</span>&nbsp;<span class="b">个人中心</span>
                            </div>
                        </td>
                    </tr>
                </table>
                <table class="box_userCenter" cellpadding="0" cellspacing="0" border="0" width="100%">
                    <tr>
                        <td align="center" valign="top">
                          
                   
                            <table class="border_dotted News" cellpadding="0" cellspacing="0" border="0" width="98%">
                                <tr>
                                    <td align="left" valign="top">
                                        &nbsp;</td>
                                </tr>
                            </table>
                            <table class="border_dotted News" cellpadding="0" cellspacing="0" border="0" width="98%">
                                <tr>
                                    <td align="left" valign="top">
                                        <div class="style1">
                                            <strong>请选择一个新照片或者使用摄像头拍摄上传进行编辑。头像保存后，你可能需要刷新一下本页面(按F5键)，才能查看最新的头像效果！</strong></div>
                                    </td>
                                </tr>
                            </table>
                  <div id="avatarctrl"  >
                    <script type="text/javascript">
                        document.write(AC_FL_RunContent('width', '540', 'height', '300', 'scale', 'exactfit', 'src', '<% =avatarFlashParam %>', 'id', 'mycamera', 'name', 'mycamera', 'quality', 'high', 'bgcolor', '#ffffff', 'wmode', 'transparent', 'menu', 'false', 'swLiveConnect', 'true', 'allowScriptAccess', 'always'));
                    </script>
                </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
